<template>
  <div class="bg h-full w-full">
    <div>
      <div class="wrapper">
        <div class="header">
          <img
            class="logo center"
            :src="require('@/assets/dialog_logo.png')"
            alt=""
          />
        </div>
        <div class="body">
          <slot name="content"></slot>
        </div>
      </div>
      <img
        v-if="showclosebtn"
        class="close_btn center"
        @click="close"
        :src="require('@/assets/dialog_close.png')"
        alt=""
      />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    showclosebtn: {
      default() {
        return true;
      },
    },
  },
  name: '',
  data() {
    return {};
  },
  created() {},
  methods: {
    close() {
      this.$emit('close');
    },
  },
};
</script>

<style lang="scss" scoped>
@import '../styles/function.scss';

.header {
  background: #fa8d9e;

  padding: switchwidth(76) 0 switchwidth(93) 0;
}
.body {
  padding: 0 switchwidth(45) switchwidth(93);
}
.bg {
  position: fixed;
  background: rgba(0, 0, 0, 0.8);
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.logo {
  height: switcheight(156);
}
.wrapper {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  margin: 0 auto;
  width: switchwidth(817);
}
.close_btn {
  width: switchwidth(120);
  margin-top: switcheight(100);
}
</style>
